// Decompiled by DJ v3.10.10.93 Copyright 2007 Atanas Neshkov  Date: 02/01/2012 08:29:26 p.m.
// Home Page: http://members.fortunecity.com/neshkov/dj.html  http://www.neshkov.com/dj.html - Check often for new version!
// Decompiler options: packimports(3) 
// Source File Name:   Conexion.java

package formularios;

import java.io.PrintStream;
import java.sql.Connection;
import java.sql.DriverManager;

public class Conexion
{

    public Conexion()
    {
    }

    public Connection getConeccion()
    {
        String usuario = "root";
        String password = "12345";
        String servidor = "localhost";
        String basedatos = "ventas";
        Connection cn = null;
        try
        {
            Class.forName("com.mysql.jdbc.Driver");
            String url = (new StringBuilder("jdbc:mysql://")).append(servidor).append("/").append(basedatos).toString();
            cn = DriverManager.getConnection(url, usuario, password);
        }
        catch(Exception e)
        {
            System.out.print((new StringBuilder("Error:")).append(e).toString());
        }
        return cn;
    }
}